<template>
    <div class="slot5">
        <h3>动态插槽名</h3>
        <el-button @click="toggleSlotName">点击切换插槽内容</el-button>
        <slot :name="customName"></slot>
    </div>
</template>
<script>
export default {
    // eslint-disable-next-line vue/multi-word-component-names
    name: 'slot5',
    data() {
        return {
            customName: 'defultName'
        }
    },
    methods: {
        toggleSlotName() {
            console.log(this.$slots)
            this.customName = this.customName === 'defultName' ? 'customName' : 'defultName'
        }
    }
}
</script>